package com.chengjj.kings.core.mutidatasource;

import org.springframework.jdbc.datasource.lookup.AbstractRoutingDataSource;

/**
 * @Author: 成俊杰
 * @CreateDate: 2019/3/12
 * @Version: 1.0
 * @Description:
 */
public class DynamicDataSource extends AbstractRoutingDataSource {
    public DynamicDataSource() {
    }

    @Override
    protected Object determineCurrentLookupKey() {
        return DataSourceContextHolder.getDateSourceType();
    }
}
